
/**
 * @fileoverview Entry point for the sample application.
 * Date: 2012/03/23
 * Time: 11:49 AM
 */


goog.provide('lfpug.Application');
goog.require('lfpug.builder.StoryBuilder');
goog.require('lfpug.model.ArrayCollection');
goog.require('lfpug.parser.StoryParser');



/**
 * @constructor
 */
lfpug.Application = function() {
  this.setupModel();

};



/**
 * Sets up the parser, builder and stories collection
 */
lfpug.Application.prototype.setupModel = function() {
  this.stories_ = new lfpug.model.ArrayCollection();
  this.builder_ = new lfpug.builder.StoryBuilder(this.stories_);
  this.parser_ = new lfpug.parser.StoryParser(this.builder_);
};





/**
 * @param {Object} data The json you wish to parse
 */
lfpug.Application.prototype.loadData = function(data) {
  this.parser_.parse(data);
};



var app = new lfpug.Application();
goog.exportSymbol('application.loadData', app.loadData);